.class Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/CloseEvent;
.super Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidEvent;
.source "CloseEvent.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/CloseEvent$1;
    }
.end annotation


# static fields
.field static final EVENT_ID:I = 0x2

.field private static final STATE:Ljava/lang/String; = "state"


# direct methods
.method constructor <init>()V
    .locals 0

    .prologue
    .line 31
    invoke-direct {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidEvent;-><init>()V

    .line 91
    return-void
.end method


# virtual methods
.method fireEvent(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;[Ljava/lang/Object;)V
    .locals 9
    .parameter "mraidView"
    .parameter "args"

    .prologue
    const/4 v8, 0x0

    const/4 v7, 0x0

    .line 45
    iget-object v3, p1, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->mViewState:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidViewState;

    .line 46
    .local v3, viewState:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidViewState;
    invoke-virtual {v3}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidViewState;->getState()Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;

    move-result-object v0

    .line 47
    .local v0, mState:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;
    iget-object v2, p1, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->mRichMediaListener:Lcom/burstly/lib/component/networkcomponent/burstly/html/IRichMediaAdListener;

    .line 48
    .local v2, richMediaListener:Lcom/burstly/lib/component/networkcomponent/burstly/html/IRichMediaAdListener;
    const/4 v1, 0x0

    .line 49
    .local v1, openedOverlay:Lcom/burstly/lib/component/networkcomponent/burstly/OverlayContainer;,"Lcom/burstly/lib/component/networkcomponent/burstly/OverlayContainer<*>;"
    sget-object v4, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/CloseEvent$1;->$SwitchMap$com$burstly$lib$component$networkcomponent$burstly$html$mraid$MraidBridgeState:[I

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;->ordinal()I

    move-result v5

    aget v4, v4, v5

    packed-switch v4, :pswitch_data_0

    .line 93
    :cond_0
    :goto_0
    return-void

    .line 51
    :pswitch_0
    sget-object v4, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->LOG:Lcom/burstly/lib/util/LoggerExt;

    sget-object v5, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->TAG:Ljava/lang/String;

    const-string v6, "Executing \'close\' for default state"

    new-array v7, v7, [Ljava/lang/Object;

    invoke-virtual {v4, v5, v6, v7}, Lcom/burstly/lib/util/LoggerExt;->logDebug(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 52
    const/16 v4, 0x8

    invoke-virtual {p1, v4}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->setVisibility(I)V

    .line 53
    const-string v4, "state"

    sget-object v5, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;->HIDDEN:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;

    invoke-virtual {v5}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;->name()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {p1, v4, v5}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->fireSimpleChangeEvent(Ljava/lang/String;Ljava/lang/Object;)V

    .line 54
    if-eqz v2, :cond_1

    .line 55
    invoke-interface {v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/IRichMediaAdListener;->onHide()V

    .line 57
    :cond_1
    sget-object v4, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;->HIDDEN:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;

    invoke-virtual {v3, v4}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidViewState;->setState(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;)V

    .line 58
    invoke-virtual {p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->getOpenedOverlay()Lcom/burstly/lib/component/networkcomponent/burstly/OverlayContainer;

    move-result-object v1

    .line 59
    if-eqz v1, :cond_0

    .line 60
    invoke-virtual {v1}, Lcom/burstly/lib/component/networkcomponent/burstly/OverlayContainer;->hideOverlayed()V

    .line 61
    invoke-virtual {p1, v8}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->setOpenedOverlay(Lcom/burstly/lib/component/networkcomponent/burstly/OverlayContainer;)V

    goto :goto_0

    .line 66
    :pswitch_1
    sget-object v4, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->LOG:Lcom/burstly/lib/util/LoggerExt;

    sget-object v5, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->TAG:Ljava/lang/String;

    const-string v6, "Executing \'close\' for expanded or resized state"

    new-array v7, v7, [Ljava/lang/Object;

    invoke-virtual {v4, v5, v6, v7}, Lcom/burstly/lib/util/LoggerExt;->logDebug(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 67
    invoke-virtual {p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->getOpenedOverlay()Lcom/burstly/lib/component/networkcomponent/burstly/OverlayContainer;

    move-result-object v1

    .line 68
    if-eqz v1, :cond_2

    .line 69
    invoke-virtual {v1}, Lcom/burstly/lib/component/networkcomponent/burstly/OverlayContainer;->hideOverlayed()V

    .line 70
    invoke-virtual {p1, v8}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->setOpenedOverlay(Lcom/burstly/lib/component/networkcomponent/burstly/OverlayContainer;)V

    .line 72
    :cond_2
    const-string v4, "state"

    sget-object v5, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;->DEFAULT:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;

    invoke-virtual {v5}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;->name()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {p1, v4, v5}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->fireSimpleChangeEvent(Ljava/lang/String;Ljava/lang/Object;)V

    .line 73
    if-eqz v2, :cond_3

    .line 74
    sget-object v4, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;->EXPANDED:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;

    if-ne v0, v4, :cond_4

    .line 75
    invoke-interface {v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/IRichMediaAdListener;->onExpandClose()Z

    .line 80
    :cond_3
    :goto_1
    sget-object v4, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;->DEFAULT:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;

    invoke-virtual {v3, v4}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidViewState;->setState(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;)V

    goto :goto_0

    .line 77
    :cond_4
    invoke-interface {v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/IRichMediaAdListener;->onResizeClose()Z

    goto :goto_1

    .line 83
    :pswitch_2
    sget-object v4, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->LOG:Lcom/burstly/lib/util/LoggerExt;

    sget-object v5, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->TAG:Ljava/lang/String;

    const-string v6, "Executing \'close\' for loading state"

    new-array v7, v7, [Ljava/lang/Object;

    invoke-virtual {v4, v5, v6, v7}, Lcom/burstly/lib/util/LoggerExt;->logDebug(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 84
    invoke-virtual {p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->getOpenedOverlay()Lcom/burstly/lib/component/networkcomponent/burstly/OverlayContainer;

    move-result-object v1

    .line 85
    if-eqz v1, :cond_0

    .line 86
    invoke-virtual {v1}, Lcom/burstly/lib/component/networkcomponent/burstly/OverlayContainer;->hideOverlayed()V

    .line 87
    invoke-virtual {p1, v8}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->setOpenedOverlay(Lcom/burstly/lib/component/networkcomponent/burstly/OverlayContainer;)V

    .line 88
    invoke-virtual {p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->stopLoading()V

    goto/16 :goto_0

    .line 49
    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method
